﻿function Get-RandomizedArray($array)
{
    $array | #1
    select -Property @{label='Position';expression={Get-Random}},@{label='Value';expression={$_}} | #2
    sort Position | #3
    select -Expand Value
}

$list= 'Ivanov, Ivan', 'Petrov, Pyotr' , 'Sidirov, Sidor'
'usual:'
Get-RandomizedArray $list
'pipeline:'
$list | Get-RandomizedArray










